TARGET = $(LIB)liblogger.a
DEBUG_TARGET = $(LIB)libdebug_logger.a

#All
.PHONY: all
all: $(TARGET)
$(TARGET): $(TARGET)(Logger.o XmlLogger.o StdLogger.o)
Logger.o: Logger.cpp Logger.h
	$(CXXFLAGS) -c -I $(INOTIFY_SRC) Logger.cpp 
XmlLogger.o: XmlLogger.cpp XmlLogger.h
	$(CXXFLAGS) -c -I$(INOTIFY_SRC) -I$(CONFIG_SRC) -I$(ERROR_SRC) \
			-I$(UTILITY_SRC) -I$(INCLUDE) XmlLogger.cpp 
StdLogger.o: StdLogger.cpp StdLogger.h
	$(CXXFLAGS) -c -I $(INOTIFY_SRC) -I$(UTILITY_SRC) StdLogger.cpp 

#Debug
.PHONY: debug
debug: $(DEBUG_TARGET)
$(DEBUG_TARGET): $(DEBUG_TARGET)(debug_Logger.o debug_XmlLogger.o debug_StdLogger.o)
debug_Logger.o: Logger.cpp Logger.h
	$(CXXFLAGS) -c $(DEBUG_FLAGS) -o debug_Logger.o -I $(INOTIFY_SRC) Logger.cpp 
debug_XmlLogger.o: XmlLogger.cpp XmlLogger.h
	$(CXXFLAGS) -c $(DEBUG_FLAGS) -o debug_XmlLogger.o -I$(INOTIFY_SRC) -I$(CONFIG_SRC) \
			-I$(ERROR_SRC) -I$(UTILITY_SRC) -I$(INCLUDE) XmlLogger.cpp 
debug_StdLogger.o: StdLogger.cpp StdLogger.h
	$(CXXFLAGS) -c $(DEBUG_FLAGS) -o debug_StdLogger.o -I $(INOTIFY_SRC) -I$(UTILITY_SRC) StdLogger.cpp 

#Clean
.PHONY: clean
clean:
	-rm *.o $(TARGET) $(DEBUG_TARGET)
